From 40e596d69ee511b70d57f30102685139f7d20e60 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 2 Apr 2025 20:01:07 +0200 Subject: [PATCH] hipblas commit 38fafed3467998b1d635d0c15f089911901bff60 Author: Samuel Thibault Date: Tue Feb 4 09:27:39 2025 +0100 Fix building with hip but without hipblas starpu_hipblas_get_local_handle() will not be useful in that case anyway. starpu_hipblas_init/shutdown being available is however convenient. (cherry picked from commit 1807cc564683ed2d7ab403350faef6e10de4d996) Gbp-Pq: Name hipblas --- include/starpu_config.h.in | 8 ++++++++ include/starpu_hipblas.h | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/starpu_config.h.in b/include/starpu_config.h.in index e4ec272..17310e2 100644 --- a/include/starpu_config.h.in +++ b/include/starpu_config.h.in @@ -82,6 +82,14 @@ */ #undef STARPU_USE_HIPBLAS +/** + Defined when StarPU has been installed with + HIP BLAS support. It should be used in your code to detect the + availability of HIP BLAS. + @ingroup API_HIP_Extensions +*/ +#undef STARPU_USE_HIPBLAS + /** Defined when StarPU has been installed with NVidia-ML support. It should be used in your code to detect the diff --git a/include/starpu_hipblas.h b/include/starpu_hipblas.h index 1c2883d..df7c00b 100644 --- a/include/starpu_hipblas.h +++ b/include/starpu_hipblas.h @@ -17,6 +17,12 @@ #ifndef __STARPU_HIPBLAS_H__ #define __STARPU_HIPBLAS_H__ +#ifdef STARPU_USE_HIP +#ifdef STARPU_USE_HIPBLAS +#include +#endif +#endif + #ifdef __cplusplus extern "C" { #endif @@ -36,10 +42,7 @@ extern "C" { void starpu_hipblas_init(void); #ifdef STARPU_USE_HIP -#ifndef STARPU_USE_HIPBLAS -typedef void* hipblasHandle_t; -#endif - +#ifdef STARPU_USE_HIPBLAS /** Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It is properly initialized and configured for multistream by @@ -47,6 +50,7 @@ typedef void* hipblasHandle_t; */ hipblasHandle_t starpu_hipblas_get_local_handle(void); #endif +#endif /** Synchronously deinitialize the HIPBLAS library on -- 2.30.2